import re
import urllib.request as request


headers = {'User-Agent':'Mozilla/5.0 3578.98 Safari/537.36'}

url = 'https://tiyu.baidu.com/match/nba/from/baidu_aladdin'

url = request.Request(url, headers=headers)
# 2、直接请求  返回结果R
response =  request.urlopen(url)

# 3、获取状态码，如果是200表示获取成功
print('状态码：', response.getcode())

# 4、读取内容
data = response.read()
print(data)
# 5、设置编码
# data = data.decode('utf-8')

# 获取所有图片的url
names = re.findall(r'', data)

print(names)
